package repository

import (
	"github.com/RaymondCode/simple-demo/entity/po"
	"gorm.io/gorm"
)

type Relation interface {
	// Insert 插入一条关注关系
	Insert(relation *po.Relation, tx *gorm.DB, isTx bool) error
	// DeleteByCondition 条件删除关系
	DeleteByCondition(relation *po.Relation, tx *gorm.DB, isTx bool) error
	// QueryByCondition 条件查询关系
	QueryByCondition(relation *po.Relation) (*[]po.Relation, error)
	// QueryFollowIdByFansId 查询关注列表
	QueryFollowIdByFansId(fansId int) ([]int, error)
	// QueryFansIdByFollowId 查询粉丝列表
	QueryFansIdByFollowId(followId int) ([]int, error)
}
